//4：求1-1000之间的数的和
public class Task {
    public static void main(String[] args) {
        int i = 1;
        int sum=0;
        while (i<=1000) {
            sum=sum+i;
            i=i+1;
        }System.out.println(sum);
    }
}